import axiosInstance from "@/utils/request";

/**
 * 图书信接口地址
 */
enum Api {
    BASE_URL = '/confirmDiagnosisInfo',
    PAGE_CONFIRM_DIAGNOSIS_INFO = `${BASE_URL}/pageInfo`,
    WARNING_STUDENT = `${BASE_URL}/warningStudent`,
    SAVE_INFO = `${BASE_URL}/saveInfo`,
    CHECK_STUDENT_IS_WARNING = `${BASE_URL}/checkStudentIsWarning`,
}

/**
 * 分页查询
 * @param data 参数
 */
export const pageConfirmDiagnosisInfoReq = (data: any) => {
    return axiosInstance({
        url: Api.PAGE_CONFIRM_DIAGNOSIS_INFO,
        method: 'post',
        data: data
    })
}

/**
 * 风险预警
 * @param data 参数
 */
export const warningStudentReq = (data: any) => {
    return axiosInstance({
        url: Api.WARNING_STUDENT,
        method: 'post',
        data: data
    })
}

/**
 * 保存信息
 * @param data 参数
 */
export const saveInfoReq = (data: any) => {
    return axiosInstance({
        url: Api.SAVE_INFO,
        method: 'post',
        data: data
    })
}

/**
 * 查询信息
 * @param studentNumber 参数
 */
export const checkStudentIsWarningReq = (studentNumber: string) => {
    return axiosInstance({
        url: `${Api.CHECK_STUDENT_IS_WARNING}/${studentNumber}`,
        method: 'get',
    })
}
